package com.cndw.kungfu.model.disciple.domain;

import java.util.Comparator;

public class DiscipleCompararor implements Comparator<Disciple> {

	@Override
	public int compare(Disciple o1, Disciple o2) {

		
		if (o1.getCampId() > 0 && o2.getCampId() > 0) {
			return o1.getCampId() - o2.getCampId();
		} else if (o1.getCampId() == 0 && o2.getCampId() == 0) {
			return o1.getGrowth() - o2.getGrowth();
		} else {
			if (o1.getCampId() > 0) {
				return -1;
			} else {
				return 1;
			}
		}
	}

}
